﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Data.SqlClient;
namespace FBProductsSynchronization
{
    //Store all Api from Fishbowl document
    public class Fishbowl
    {
        public static string listCustomerName(string key)
        {
            return "<FbiXml><Ticket><Key>" + key + "</Key></Ticket><FbiMsgsRq><CustomerNameListRq></CustomerNameListRq></FbiMsgsRq></FbiXml>";
        }
             
        public static string GetPick(string key, string SOnumber)
        {
            return "<FbiXml><Ticket><Key>" + key + "</Key></Ticket><FbiMsgsRq><GetPickRq><PickNum>S" + SOnumber +
                   "</PickNum></GetPickRq></FbiMsgsRq></FbiXml>";
        }
        public static string SavePick(string key, string pick)
        {
            return "<FbiXml><Ticket><Key>" + key + "</Key></Ticket><FbiMsgsRq><SavePickRq>" + pick +
                    "</SavePickRq></FbiMsgsRq></FbiXml>";
        }
        public static string SaveShip(string key, string SOnumber, string deliveryDate)
        {

            return "<FbiXml><Ticket><Key>" + key + "</Key></Ticket><FbiMsgsRq><ShipRq><ShipDate>" + deliveryDate + "</ShipDate><OrderNums><OrderNum>S" + SOnumber + "</OrderNum></OrderNums>" +
                   "</ShipRq></FbiMsgsRq></FbiXml>";
        }
        public static string GetShipList(string key, string SOnumber)
        {
            return "<FbiXml><Ticket><Key>" + key + "</Key></Ticket><FbiMsgsRq><GetShipListRq><StartRecord>0</StartRecord>" +
                   "<RecordCount>10</RecordCount><OrderNumber>" + SOnumber + "</OrderNumber>" +
                   "</GetShipListRq></FbiMsgsRq></FbiXml>";
        }
        public static string GetShipment(string key, int shipId)
        {
            return "<FbiXml><Ticket><Key>" + key + "</Key></Ticket><FbiMsgsRq><GetShipmentRq><ShipmentID>" + shipId + "</ShipmentID>" +
                   "</GetShipmentRq></FbiMsgsRq></FbiXml>";
        }
        public static string Export(string key, string exportType)
        {
            return "<FbiXml><Ticket><Key>" + key + "</Key></Ticket><FbiMsgsRq><ExportRq><Type>" + exportType + "</Type></ExportRq></FbiMsgsRq></FbiXml>";
        }
        public static string ProductRQ(string key, string producNum)
        {
            return "<FbiXml><Ticket><Key>" + key + "</Key></Ticket><FbiMsgsRq><ProductQueryRq><ProductNum>" + producNum +
                   "</ProductNum></ProductQueryRq></FbiMsgsRq></FbiXml>";
        }
        public static string InvQtyRq(string key, string producNum)
        {
            return "<FbiXml><Ticket><Key>" + key + "</Key></Ticket><FbiMsgsRq><InvQtyRq><PartNum>" + producNum + "</PartNum>" +
                   "</InvQtyRq></FbiMsgsRq></FbiXml>";
        }
    }
}
